﻿<%@ Page Title="" Language="C#" MasterPageFile="~/masterpage_index.master" AutoEventWireup="true" CodeFile="list_users.aspx.cs" Inherits="list_uers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            text-decoration: none;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
          Logged in as
<asp:Label ID="lUser" runat="server" Text="Label"></asp:Label>
&nbsp;|
<asp:LinkButton ID="Logout" runat="server" >Logout</asp:LinkButton>
<br />
&nbsp; Campus:
<asp:Label ID="lCampusLogin" runat="server" Text="Label"></asp:Label>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">   
<br />
     <ul class="breadcrumb">
        <li>
            <a href="index.aspx" title="Home">
                 <img src="images/home.png" width="24" height="23" border="0" align="left"  class="home" />
            </a>
        </li>
        <li style="color:#454545;">
           <a href="index.aspx" title="Home">
            
              Homepage
            
           </a>
        </li>
        <li>
            List users
        </li>
        
     </ul>
    </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

                <table width="94%" align="center">
                    <tr>
                <td align="center" colspan="2">
                     
                    <b>
                       <h2 style="background-image:url('../images/rect_gradient.png') ; height:30px;width:400px;">
                           
                               <img src="../images/bullet_rect.png" width="16" height="16" border="0" /> Manger 
                               Users
                                <img src="../images/bullet_rect.png" width="16" height="16" border="0" /> 
                         </h2>
                         </b>
                   </td>
            </tr>
                
                    <tr>
                        <td align="left">Fullname:</td>
                        
                        
                        <td align="left"><strong>
                            <asp:TextBox ID="txtFullname" runat="server" CssClass="box" Width="313px"></asp:TextBox>
                            </strong></td>
                        
                        
                    </tr>
                
                
                    <tr>
                        <td align="left">Username:</td>
                        
                        
                        <td align="left">
        <a href="index.aspx">	
                            <strong>
                            <asp:TextBox ID="txtUserName" runat="server" CssClass="box" Width="313px"></asp:TextBox>
                            </strong></td>
                        
                        
                    </tr>
                
                
                    <tr>
                        <td align="left">Password:</td>
                        
                        
                        <td align="left">
        <a href="index.aspx">	
                            <strong>
                            <asp:TextBox ID="txtPassword" runat="server" CssClass="box" Width="313px"></asp:TextBox>
                            </strong></td>
                        
                        
                    </tr>
                
                
                    <tr>
                        <td align="left">Retype Password:</td>
                        
                        
                        <td align="left">
        <a href="index.aspx" class="style1">	
        <a href="index.aspx">	
                            <strong>
                            <asp:TextBox ID="txtRetypePass" runat="server" CssClass="box" Width="313px"></asp:TextBox>
                            </strong></td>
                        
                        
                    </tr>
                
                
                    <tr>
                        <td align="left">Group</td>
                        
                        
                        <td align="left">
                            <asp:DropDownList ID="cbGroup" runat="server">
                            </asp:DropDownList>
                        </td>
                        
                        
                    </tr>
                
                
                    <tr>
                        <td align="left">Status</td>
                        
                        
                        <td align="left">
                            <asp:CheckBox ID="chkActive" runat="server" Text="Active"/>
                        </td>
                        
                        
                    </tr>
                
                
                    <tr>
                        <td align="left">&nbsp;</td>
                        
                        
                        <td align="left">
                            <asp:Button ID="btnAdd" runat="server" CssClass="button white" 
                                Text="Add" Width="80px" onclick="btnAdd_Click" />
                        </td>
                        
                        
                    </tr>
                
                
                </table>
              <div style="clear:both;">
              <br /><br />
                <asp:GridView ID="gdUsers" runat="server" AllowPaging="True" AutoGenerateColumns="False"                    
                  
                   CssClass="border_grid" HorizontalAlign="Center" 
                     
                      Width="94%">
                   <PagerStyle CssClass="grid_footer_pager" />
                   <Columns>
           
                       <asp:TemplateField HeaderText="No">
                           <HeaderStyle CssClass="header_grid" />
                           <ItemTemplate>
                                   <%#Container.DataItemIndex + 1%>
                               
                           </ItemTemplate> 
                       </asp:TemplateField>
   
                       
                       <asp:TemplateField HeaderText="id">
                             <HeaderStyle CssClass="header_grid" />
                           <ItemTemplate>
                                   <%#Eval("id")%>
                               
                           </ItemTemplate> 
                       </asp:TemplateField>
   
                       
                       <asp:TemplateField HeaderText="Group">
                       <HeaderStyle CssClass="header_grid" />
                               <ItemTemplate><%#Eval("group_name")%></ItemTemplate>
                           <ItemStyle HorizontalAlign="Center" />
                        
                       </asp:TemplateField>
                       
                       <asp:TemplateField HeaderText="Fullname">
                           <HeaderStyle CssClass="header_grid" />
                           <ItemTemplate><%#Eval("fullname")%></ItemTemplate>
                           <ItemStyle HorizontalAlign="Left" />
                       </asp:TemplateField>
                       <asp:TemplateField HeaderText="Username">
                           <HeaderStyle CssClass="header_grid" />
                           
                            <ItemTemplate><%#Eval("username")%></ItemTemplate>
                       </asp:TemplateField>
                       <asp:BoundField DataField="date_created" DataFormatString="{0:dd-MM-yyyy}" 
                           HeaderText="Date Created" >
                       <HeaderStyle CssClass="header_grid" />
                       </asp:BoundField>
                          
                       <asp:TemplateField HeaderText="Status">
                       <HeaderStyle CssClass="header_grid" />
                          <ItemTemplate>
                                <asp:LinkButton ID="lnkActive" 
                                CommandArgument='<%#Eval("id")%>'
                                CommandName="Update" runat="server" Text='<%#Eval("status") %>'>
                                    
                                </asp:LinkButton>
                              
                           </ItemTemplate>
                           <ItemStyle HorizontalAlign="Center" />
                       </asp:TemplateField>
                       
                   </Columns>
                   <FooterStyle HorizontalAlign="Right" BackColor="DarkGray" BorderColor="DarkGray" 
                        BorderStyle="Solid" BorderWidth="1px" />
                
                   <PagerStyle HorizontalAlign="Center" VerticalAlign="Middle" />
               </asp:GridView>
               </p>
              </div>
            </asp:Content>

